package com.example.demo.test4.controller;


import com.example.demo.test4.entity.Test4;
import com.example.demo.test4.service.ITest4Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-09-18
 */
@RestController
@RequestMapping("/test4/test4")
public class Test4Controller {
    @Autowired
    private ITest4Service test4Service;

    @GetMapping("/test")
    public Boolean getTest(String id){
        Test4 test4 = test4Service.getById(id);
        if (0 == test4.getTestValue()){
            return true;
        }
        return false;
    }
}

